$(function () {

    //初始加载
    data = { 'id': $('.js-only').attr('id')};
    result = apiAjax0(data, apiUrlGetProject);//请求数据
    if (result) {
        project = result.data.project;
        user = result.data.user;

        $('title').text($('title').text().replace('项目', project.name));
        $('#keywords').attr('content', '项目关键词');
        $('#description').attr('content', '项目简介');
        
        $('.js-project-image').attr('src', project.image);
        $('.js-project-name').text(project.name);
        $('.js-project-price').text('￥'+project.price);
        $('#js-project-introduce').text(project.introduce);
        $('.js-project-sellnum').text('获取总数:'+project.sell_num);
        $('.js-project-releasedate').text('发布日期:'+project.release_date);

        $('.js-user-avatar').attr('src', user.avatar);
        $('.js-user-username').text(user.username);
    }

})